package pers.cocoadel.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author rwby
 */
@RestController
@RefreshScope
public class ClientController
{

    @Value("${profile}")
    private String configInfo;

    @Value("${server.port}")
    private String serverPort;

    @GetMapping("/client/getInfo")
    public String getConfigInfo()
    {
        return serverPort + " -- " + configInfo;
    }
}
